#include <bits/stdc++.h>
#define PII pair<int, int>
#define db long double
#define ull unsigned long long
#define uint unsigned int
#define mp make_pair
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define sec second
#define fi frist
using namespace std;

const int MOD = 998244353, N = 200050;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
int T = 1, n, m;

inline void read(int &x) {
    int f = 1; x = 0;
    char c = getchar();
    if (c == '-') f = -1;
    while (c > '9' || c < '0') {
        c = getchar();
        if (c == '-') f = -1;
    }
    while (c <= '9' && c >= '0') 
        x = x * 10 + (c - '0'), c = getchar();
    x *= f;
    return;
}

int a[N], pre;

int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    // cin >> T;
    while (T--) {
        pre = 0;
        cin >> n;
        for (int i = 1, x; i <= n; i++) read(x), a[x]++;
        for (int i = 1; i <= 100000; i++) {
            if (pre >= a[i]) pre -= a[i];
            else pre = 0;
            pre += a[i];
        }
        cout << pre;
    }
    return 0;
}
/*
g++ duel.cpp -o duel -O2
5
1 2 3 1 2
*/